import javaService from '../javaHttp'
// 公告上传图片
export function uploadImg(data) {
  return javaService({
    url: `${process.env.VUE_APP_DEV_JAVA_BASE_HOST}/upload/file`,
    method: 'post',
    data: data,
    headers: {
     'Content-Type': 'multipart/form-data'
   }

  })
}
// 公告列表
export function getAnnouncementList(params) {
  return javaService({
    url: `${process.env.VUE_APP_DEV_JAVA_BASE_HOST}/banner/getBannerPageList`,
    method: 'get',
    params

 })
 }
 // 新增公告列表
 export function addAnnouncement(data) {
   return javaService({
     url: `${process.env.VUE_APP_DEV_JAVA_BASE_HOST}/banner/bannerSave`,
     method: 'post',
     data

  })
  }
  // 公告修改启用状态
 export function changeAnnouncementStatus(data) {
   return javaService({
     url: `${process.env.VUE_APP_DEV_JAVA_BASE_HOST}/banner/bannerSave`,
     method: 'post',
     data

  })
  }
  // 删除公告
  export function delAnnouncement(params) {
    return javaService({
      url: `${process.env.VUE_APP_DEV_JAVA_BASE_HOST}/banner/bannerDelete`,
      method: 'post',
      params

   })
   }
   // 编辑
 export function editAnnouncement(params) {
    return javaService({
      url: `${process.env.VUE_APP_DEV_JAVA_BASE_HOST}/banner/bannerGetById`,
      method: 'get',
      params

   })
   }
